3.1.41 \(\int x \sqrt {x+x^2} \, dx\) [41]

Optimal. Leaf size=48 \[ -\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{8} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right ) \]

[Out]

1/3*(x^2+x)^(3/2)+1/8*arctanh(x/(x^2+x)^(1/2))-1/8*(1+2*x)*(x^2+x)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {654, 626, 634, 212} \begin {gather*} \frac {1}{3} \left (x^2+x\right )^{3/2}-\frac {1}{8} (2 x+1) \sqrt {x^2+x}+\frac {1}{8} \tanh ^{-1}\left (\frac {x}{\sqrt {x^2+x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x*Sqrt[x + x^2],x]

[Out]

-1/8*((1 + 2*x)*Sqrt[x + x^2]) + (x + x^2)^(3/2)/3 + ArcTanh[x/Sqrt[x + x^2]]/8

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 626

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^p/(2*c*(2*p + 1
))), x] - Dist[p*((b^2 - 4*a*c)/(2*c*(2*p + 1))), Int[(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c}, x]
 && NeQ[b^2 - 4*a*c, 0] && GtQ[p, 0] && IntegerQ[4*p]

Rule 634

Int[1/Sqrt[(b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(1 - c*x^2), x], x, x/Sqrt[b*x + c*x^2
]], x] /; FreeQ[{b, c}, x]

Rule 654

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*((a + b*x + c*x^2)^(p +
 1)/(2*c*(p + 1))), x] + Dist[(2*c*d - b*e)/(2*c), Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}
, x] && NeQ[2*c*d - b*e, 0] && NeQ[p, -1]

Rubi steps

\begin {align*} \int x \sqrt {x+x^2} \, dx &=\frac {1}{3} \left (x+x^2\right )^{3/2}-\frac {1}{2} \int \sqrt {x+x^2} \, dx\\ &=-\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{16} \int \frac {1}{\sqrt {x+x^2}} \, dx\\ &=-\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{8} \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {x+x^2}}\right )\\ &=-\frac {1}{8} (1+2 x) \sqrt {x+x^2}+\frac {1}{3} \left (x+x^2\right )^{3/2}+\frac {1}{8} \tanh ^{-1}\left (\frac {x}{\sqrt {x+x^2}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 49, normalized size = 1.02 \begin {gather*} \frac {1}{24} \sqrt {x (1+x)} \left (-3+2 x+8 x^2+\frac {3 \tanh ^{-1}\left (\sqrt {\frac {x}{1+x}}\right )}{\sqrt {x} \sqrt {1+x}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x*Sqrt[x + x^2],x]

[Out]

(Sqrt[x*(1 + x)]*(-3 + 2*x + 8*x^2 + (3*ArcTanh[Sqrt[x/(1 + x)]])/(Sqrt[x]*Sqrt[1 + x])))/24

________________________________________________________________________________________

Maple [A]
time = 0.40, size = 38, normalized size = 0.79

method result size
trager \(\left (\frac {1}{3} x^{2}+\frac {1}{12} x -\frac {1}{8}\right ) \sqrt {x^{2}+x}+\frac {\ln \left (2 x +1+2 \sqrt {x^{2}+x}\right )}{16}\) \(37\)
default \(\frac {\left (x^{2}+x \right )^{\frac {3}{2}}}{3}-\frac {\left (2 x +1\right ) \sqrt {x^{2}+x}}{8}+\frac {\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{16}\) \(38\)
risch \(\frac {\left (8 x^{2}+2 x -3\right ) x \left (x +1\right )}{24 \sqrt {x \left (x +1\right )}}+\frac {\ln \left (x +\frac {1}{2}+\sqrt {x^{2}+x}\right )}{16}\) \(38\)
meijerg \(-\frac {\frac {\sqrt {\pi }\, \sqrt {x}\, \left (-40 x^{2}-10 x +15\right ) \sqrt {x +1}}{60}-\frac {\sqrt {\pi }\, \arcsinh \left (\sqrt {x}\right )}{4}}{2 \sqrt {\pi }}\) \(39\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(x^2+x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/3*(x^2+x)^(3/2)-1/8*(2*x+1)*(x^2+x)^(1/2)+1/16*ln(x+1/2+(x^2+x)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 46, normalized size = 0.96 \begin {gather*} \frac {1}{3} \, {\left (x^{2} + x\right )}^{\frac {3}{2}} - \frac {1}{4} \, \sqrt {x^{2} + x} x - \frac {1}{8} \, \sqrt {x^{2} + x} + \frac {1}{16} \, \log \left (2 \, x + 2 \, \sqrt {x^{2} + x} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x^2+x)^(1/2),x, algorithm="maxima")

[Out]

1/3*(x^2 + x)^(3/2) - 1/4*sqrt(x^2 + x)*x - 1/8*sqrt(x^2 + x) + 1/16*log(2*x + 2*sqrt(x^2 + x) + 1)

________________________________________________________________________________________

Fricas [A]
time = 1.56, size = 37, normalized size = 0.77 \begin {gather*} \frac {1}{24} \, {\left (8 \, x^{2} + 2 \, x - 3\right )} \sqrt {x^{2} + x} - \frac {1}{16} \, \log \left (-2 \, x + 2 \, \sqrt {x^{2} + x} - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x^2+x)^(1/2),x, algorithm="fricas")

[Out]

1/24*(8*x^2 + 2*x - 3)*sqrt(x^2 + x) - 1/16*log(-2*x + 2*sqrt(x^2 + x) - 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x \sqrt {x \left (x + 1\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x**2+x)**(1/2),x)

[Out]

Integral(x*sqrt(x*(x + 1)), x)

________________________________________________________________________________________

Giac [A]
time = 0.82, size = 38, normalized size = 0.79 \begin {gather*} \frac {1}{24} \, {\left (2 \, {\left (4 \, x + 1\right )} x - 3\right )} \sqrt {x^{2} + x} - \frac {1}{16} \, \log \left ({\left | -2 \, x + 2 \, \sqrt {x^{2} + x} - 1 \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x^2+x)^(1/2),x, algorithm="giac")

[Out]

1/24*(2*(4*x + 1)*x - 3)*sqrt(x^2 + x) - 1/16*log(abs(-2*x + 2*sqrt(x^2 + x) - 1))

________________________________________________________________________________________

Mupad [B]
time = 0.08, size = 33, normalized size = 0.69 \begin {gather*} \frac {\ln \left (x+\sqrt {x\,\left (x+1\right )}+\frac {1}{2}\right )}{16}+\frac {\sqrt {x^2+x}\,\left (8\,x^2+2\,x-3\right )}{24} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(x + x^2)^(1/2),x)

[Out]

log(x + (x*(x + 1))^(1/2) + 1/2)/16 + ((x + x^2)^(1/2)*(2*x + 8*x^2 - 3))/24

________________________________________________________________________________________